<template>
  <div>
    <FileUpload @fileUrl="getFileUrl" ref="fileUploadDialog">
    </FileUpload>
    <el-button type="primary" size="mini" @click="handleAdd" class="uploadBtn" circle icon="el-icon-upload2"></el-button>
  </div>
</template>

<script>
import FileUpload from "@/components/FileUpload/index.vue";
export default {
  data() {
    return {
      fileUrl: "",
    };
  },
  components: { FileUpload },
  methods: {
    getFileUrl(event) {
      this.fileUrl = event;
    },
    handleAdd(event) {
      //打开上传页面
      // console.log(event);
      this.$refs.fileUploadDialog.show();
    },
  },
};
</script>

<style  scoped>
.uploadBtn {
  margin: 12px;
}
</style>
